package com.money.modules.main.view
{
	import com.money.modules.main.view.ui.ColorBtnGroup;
	import com.money.shell.view.ui.MenuBar;
	
	import flash.events.MouseEvent;
	import flash.geom.Point;
	
	import mx.collections.XMLListCollection;
	import mx.controls.Alert;
	import mx.controls.Image;
	import mx.core.IVisualElementContainer;
	import mx.events.FlexEvent;
	import mx.utils.ArrayUtil;
	
	import org.puremvc.as3.multicore.interfaces.IMediator;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.mediator.Mediator;

	public class ColorBtnGroupMediator extends Mediator implements IMediator
	{
		public static const NAME:String = "ColorBtnGroupMediator";
		public function MenuMediator(viewComponent:MenuBar)
		{
			super(NAME, viewComponent);
		}
		private function get colorBtnGroup():ColorBtnGroup
		{
			return viewComponent as ColorBtnGroup;
		}
		override public function onRegister():void
		{
		}
		override public function onRemove():void
		{
		}
		override public function listNotificationInterests():Array
		{
			return [ShellFacade.ADDWINDOW,ShellFacade.SHORTCUTINI,];
		}
		
		override public function handleNotification(note:INotification):void
		{
			switch (note.getName())
			{
				case ShellFacade.ADDWINDOW:
					var win:KWindow=note.getBody() as KWindow;
						addWindow(win,win.title,win.name);
					break;
				case ShellFacade.SHORTCUTINI:
					var xmlc:XMLListCollection=note.getBody() as XMLListCollection;
					windowsContainer.shortCut.dataProvider=xmlc;
					break;
			}
		}
	}
}